home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bjobhandler.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1.8 KB  |  65 lines

  1. /* 
  2.  *
  3.  * $Id: k3bjobhandler.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2004 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_JOB_HANDLER_H_
  17. #define _K3B_JOB_HANDLER_H_
  18.  
  19.  
  20. #include <k3bdiskinfo.h>
  21. #include <k3bdevice.h>
  22.  
  23.  
  24. /**
  25.  * See @p K3bJobProgressDialog as an example for the usage of
  26.  * the K3bJobHandler interface.
  27.  */
  28. class K3bJobHandler
  29. {
  30.  public:
  31.   K3bJobHandler() {}
  32.   virtual ~K3bJobHandler() {}
  33.  
  34.   /**
  35.    * \return true if the handler itself is also a job
  36.    */
  37.   virtual bool isJob() const { return false; }
  38.  
  39.   /**
  40.    * @return K3bDevice::MediaType on success,
  41.    *         0 if forced (no media info available),
  42.    *         and -1 on error (canceled)
  43.    */
  44.   virtual int waitForMedia( K3bDevice::Device*,
  45.                 int mediaState = K3bDevice::STATE_EMPTY,
  46.                 int mediaType = K3bDevice::MEDIA_WRITABLE_CD,
  47.                 const QString& message = QString::null ) = 0;
  48.  
  49.   // FIXME: use KGuiItem  
  50.   virtual bool questionYesNo( const QString& text,
  51.                   const QString& caption = QString::null,
  52.                   const QString& yesText = QString::null,
  53.                   const QString& noText = QString::null ) = 0;
  54.  
  55.   /**
  56.    * Use this if you need the user to do something before the job is able to continue.
  57.    * In all other cases an infoMessage should be used.
  58.    */
  59.   virtual void blockingInformation( const QString& text,
  60.                     const QString& caption = QString::null ) = 0;
  61.  
  62. };
  63.  
  64. #endif
  65.